home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / hypr-tch.hqx / HyperTEACH! / HyperTEACH / stack.txt < prev   
Text File  |  1992-09-18  |  24KB  |  889 lines

  1. -- stack: in
  2. -- format: 10 (HyperCard 2)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=40, x2=512, y2=382)
  7. -- screen: Rect(x1=0, y1=0, x2=512, y2=384)
  8. -- card dimensions: w=512 h=342
  9. -- scroll: x=0 y=0
  10. -- background count: 1
  11. -- first background id: 5465
  12. -- card count: 1
  13. -- first card id: 5329
  14. -- list block id: 2089
  15. -- print block id: 2685
  16. -- font table block id: 3543
  17. -- style table block id: 3129
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 27264 bytes
  21. -- stack block size: 23040 bytes
  22. -- created by hypercard version: 0x02018000
  23. -- compacted by hypercard version: 0x02108000
  24. -- modified by hypercard version: 0x02008000
  25. -- opened by hypercard version: 0x02018000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0xDEB9E284
  67. ----- HyperTalk script -----
  68. --HyperTEACH   v. 1.02b
  69. 11/17/91
  70. --Copyright @1991 by Michael Land
  71. --Michael Land
  72. --3400 Taft Blvd
  73. --Midwestern State University
  74. --Wichita Falls, TX 76308
  75. --Office: (817) 692-6611 ext 4139
  76. --Home (817) 692-8573
  77. --CompuServe: 71640,2020
  78. --AppleLink: MLand or West.Exc.Lab
  79. --BITNET: MLand@AppleLink.APPLE.COM
  80.  
  81. --The videodisc drivers in this stack are courtesy of
  82. --The Voyager Company,
  83. --Pacific Coast Highway
  84. --Santa Monica, CA 90401
  85. --(213) 451-1383.
  86. --They may NOT be used in any commercial product without permission
  87. --from the Voyager Company
  88.  
  89. on openStack
  90.   global positiveCard, optionsData
  91.  
  92.   set the UserLevel to 5
  93.  
  94.   if the short Name of this stack is "HyperTEACH"
  95.   then
  96.   put empty into fld "Positive Data"
  97.   put "0" into word 1 of fld "Options"
  98.   put "50" into word 2 of fld "Options"
  99.   put "te" into word 3 of fld "Options"
  100.   put "te" into word 4 of fld "Options"
  101.   answer "This is your master copy of HyperTEACH.  Do you want to start a new stack?" WITH "No" OR "Yes"
  102.   if it is "Yes"
  103.   then
  104.   ask "Name of your new stack:" with "Type file name here."
  105.   put it into newName
  106.   create stack newName with bg "MSTR"
  107.   exit openStack
  108. else
  109.   ASK "You are about to exit the program!" with "OK"
  110.   if it is "me"
  111.   then
  112.   exit openStack
  113. else
  114.   doMenu "Quit HyperCard"
  115. end if
  116. end if
  117. end if
  118. video init
  119.  
  120. put fld "Positive Data" into positiveCard
  121. put fld "Options" into optionsData
  122. --tells the location of the Positive feedback cards & keeps track
  123. --of options
  124.  
  125. if word 3 of optionsData contains "te"
  126. then
  127. put "This is" && the long name of this stack && "."
  128. put "Teacher" after menu "Go" with menuMessage showTeach
  129. set commandChar of menuItem "Teacher" of menu "Go" to "T"
  130. hide menubar
  131. show bg btn "Right"
  132. show bg btn "Left"
  133. set the userLevel to 5
  134. palette "Teacher", "30, 50"
  135. else
  136.   if word 3 of optionsData contains "st"
  137.   then
  138.   reset menubar
  139.   hide menubar
  140.   hide message
  141.   hide bg btn "Right"
  142.   hide bg btn "Left"
  143.   hide tool window
  144.   hide message
  145.   if there is a window "Teacher"
  146.   then
  147.   close window "Teacher"
  148. end if
  149. set the userLevel to 3
  150. end if
  151. end if
  152. pass openStack
  153. end openStack
  154.  
  155.  
  156. on closeStack
  157.   if there is a window "Teacher"
  158.   then
  159.   close window "Teacher"
  160. end if
  161. reset menubar
  162. pass closeStack
  163. end closeStack
  164.  
  165. on idle
  166.   if the short name of this stack is "HyperTEACH"
  167.   then
  168.   if the number of cards > 1
  169.   then
  170.   answer "This is your master HyperTEACH stack.  It should have only one card; it currently has" && the number of cards && "cards.  The extra is being removed." with "Oops!!!"
  171.   go last
  172.   doMenu "Cut card"
  173. end if
  174. end if
  175. pass idle
  176. end idle
  177.  
  178. on showTeach
  179.   if there is a window "Teacher"
  180.   then
  181.   close window "Teacher"
  182. else
  183.   palette "Teacher", "30, 50"
  184. end if
  185. end showTeach
  186.  
  187. on returnKey
  188.   choose browse tool
  189.   pass returnKey
  190. end returnKey
  191.  
  192. on arrowKey
  193. end arrowKey
  194.  
  195. on pushIt
  196.   lock screen
  197.   push this card
  198.   go bg "MSTR"
  199. end pushIt
  200.  
  201. on changeSpecs
  202.   global optionsData
  203.  
  204.   if the shiftKey is down
  205.   then
  206.   answer "Do you want to change the USER (Teacher or Student) or the PAUSE after feedback?" with "USER" or "PAUSE"
  207.   pushIt
  208.   if it is "USER" then userChange
  209.   if it is "PAUSE" then pauseFdbk
  210. end if
  211. pop card
  212. end changeSpecs
  213.  
  214. on pauseFdbk
  215.   global optionsData
  216.   answer "Set the pause on feedback after correct pages to 50 or 100 ticks?" with "50" or "100"
  217.   if it is "50"
  218.   then
  219.   set the cursor to watch
  220.   lock screen
  221.   put 50 into word 2 of fld "Options"
  222.   put 50 into word 2 of optionsData
  223.   unlock screen
  224. else
  225.   set the cursor to watch
  226.   lock screen
  227.   put 100 into word 2 of fld "Options"
  228.   put 100 into word 2 of optionsData
  229.   unlock screen
  230. end if
  231. end  pauseFdbk
  232.  
  233. on userChange
  234.   global optionsData
  235.   answer "Set for Student or Teacher use?" with "Student" or "Teacher"
  236.   if it is "Student"
  237.   then
  238.   put st into word 3 of fld "Options"
  239.   put st into word 3 of optionsData
  240.   if there is a window "Teacher"
  241.   then
  242.   close window "Teacher"
  243. end if
  244. reset menubar
  245. hide menubar
  246. hide bg btn "Right"
  247. hide bg btn "Left"
  248. hide tool window
  249. set the userLevel to 2
  250. end if
  251. if it is "Teacher"
  252. then
  253. put te into word 3 of fld "Options"
  254. put te into word 3 of optionsData
  255. put "Teacher" after menu "Go" with menuMessage showTeach
  256. set commandChar of menuItem "Teacher" of menu "Go" to "T"
  257. hide menubar
  258. palette "Teacher", "30, 50"
  259. show bg btn "Right"
  260. show bg btn "Left"
  261. set the userLevel to 5
  262. end if
  263. end userChange
  264.  
  265. on doMenu item
  266.   if item is "Cut Button" or item is  "Clear Button"
  267.   then
  268.   answer "If you are trying to remove a smiley face from a page, use the cut page icon below." with "OK"
  269.   exit doMenu
  270. end if
  271. if item is "Delete Stack..."
  272. then
  273. answer "Cannot delete this stack." with "OK"
  274. exit doMenu
  275. end if
  276. pass doMenu
  277. end doMenu
  278.  
  279.  
  280. on teach
  281.   palette "Teacher", "30, 50"
  282. end teach
  283.  
  284. on showTool
  285.   global optionsData
  286.   if word 4 of optionsData contains "st"
  287.   then
  288.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  289.   exit showTool
  290. end if
  291. show Tool window at 444,32
  292. end showTool
  293.  
  294.  
  295.  
  296.  
  297. on newPage
  298.   global optionsData
  299.  
  300.   if word 4 of optionsData contains "st"
  301.   then
  302.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  303.   exit newPage
  304. end if
  305. answer "New page on existing background or a new background?" with "New" or "Existing"
  306. if it is "Existing"
  307. then
  308. doPageBtn
  309. else
  310.   doNewBg
  311. end if
  312. end newPage
  313.  
  314. on doPageBtn
  315.   answer "New card before or after this card?" with "Before" or "After"
  316.   if it is "Before"
  317.   then
  318.   lock screen
  319.   go previous
  320.   doMenu new card
  321.   unlock screen
  322. else
  323.   doMenu new card
  324. end if
  325. end doPageBtn
  326.  
  327. on doNewBg
  328.   lock screen
  329.   set the cursor to busy
  330.   go last cd of bg (the number of backgrounds)
  331.   doMenu "New Background"
  332.   go bg "MSTR"
  333.   choose the lasso tool
  334.   doMenu "Select All"
  335.   doMenu "Copy Picture"
  336.   go bg (the number of backgrounds)
  337.   doMenu "Paste Picture"
  338.   go bg "MSTR"
  339.   choose button tool
  340.   click at the loc of bg btn "Left"
  341.   doMenu "Copy Button"
  342.   go bg (the number of backgrounds)
  343.   doMenu "Paste Button"
  344.   go bg "MSTR"
  345.   choose button tool
  346.   click at the loc of bg btn "Right"
  347.   doMenu "Copy Button"
  348.   go bg (the number of backgrounds)
  349.   doMenu "Paste Button"
  350.   go bg "MSTR"
  351.   choose fld tool
  352.   click at the loc of fld "Page"
  353.   doMenu "Copy Field"
  354.   go bg (the number of backgrounds)
  355.   doMenu "Paste Field"
  356.   set the script of bg(the number of backgrounds) to "on openCard" & return & "put the number of this card into fld" && quote & "Page" & quote & return & "put" && quote && "of" && quote && "& the number of cards after fld" && quote & "Page" & quote & return & "pass openCard" & return & "end openCard"
  357.   answer "You are on your new background.  When you are ready to be on the card level, use Command-B to leave the background."
  358.   choose browse tool
  359.   go prev
  360.   go next
  361. end doNewBg
  362.  
  363.  
  364. on makeField
  365.   global optionsData
  366.  
  367.   if word 4 of optionsData contains "st"
  368.   then
  369.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  370.   exit makeField
  371. end if
  372. choose browse tool
  373. set the cursor to watch
  374. doMenu New Field
  375. show tool window at 443,20
  376. answer "Size the field by pulling on a corner and then dragging it where you want it." with "OK"
  377. end makeField
  378.  
  379.  
  380. on linkPage
  381.   global optionsData
  382.   if word 4 of optionsData contains "st"
  383.   then
  384.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  385.   exit linkPage
  386. end if
  387. choose browse tool
  388. ask "You are on card" && the number of this cd & ".  What card do you want to link TO?" with the number of this cd + 1
  389. if it < 1 or it > the number of cards
  390. then
  391. ask "You are on card" && the number of this cd & ".  What card do you want to link TO?" with the number of this cd + 1
  392. if it < 1 or it > the number of cards
  393. then
  394. answer "Can't link to card" && it & "." with "Cancel"
  395. exit linkPage
  396. else
  397.   makeLinkBtn it
  398. end if
  399. end if
  400. makeLinkBtn it
  401. end linkPage
  402.  
  403.  
  404. on makeLinkBtn linkNum
  405.   lock screen
  406.   set the cursor to watch
  407.   doMenu "New Button"
  408.   set the script of btn (the number of buttons) to "on mouseUp" & return & "visual effect scroll left slowly" & return & "go cd" && linkNum & return & "end mouseUp"
  409.   set the icon of btn (the number of buttons) to 1013
  410.   set the style of btn (the number of buttons) to transparent
  411.   set showName of btn (the number of buttons) to false
  412.   set autohilite of btn (the number of buttons) to true
  413.   answer "Size the button; drag it to where you want it; then choose the Browse tool." with "OK"
  414.   unlock screen
  415. end makeLinkBtn
  416.  
  417.  
  418. on makeVideo
  419.   global cavClv, theResult, optionsData
  420.  
  421.   if word 4 of optionsData contains "st"
  422.   then
  423.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  424.   exit makeVideo
  425. end if
  426.  
  427. if there is a stack "Audio Help" then
  428.   start using stack "Audio Help"
  429.   send "startSound" to stack "Audio Help"
  430.   answer "Prepare an audio sequence or a video button?" with "Audio" or "Video"
  431.   if it is "Audio"
  432.   then
  433.   doMenu "Audio..."
  434.   exit makeVideo
  435. else
  436. end if
  437. end if
  438.  
  439. choose browse tool
  440. put empty into cavClv
  441. video getStatus
  442.  
  443. put item 3 of the result into theResult
  444. if theResult contains "CAV"
  445. THEN
  446. GETFRAMESEQ
  447. ELSE
  448.   if theResult contains "CLV"
  449.   THEN SEQUENCEVIDEO
  450. ELSE
  451.   askType
  452.   if cavClv is empty then exit makeVideo
  453.   if cavClv contains "CAV"
  454.   then
  455.   getFrameSeq
  456. ELSE
  457.   if cavClv contains "CLV"
  458.   then
  459.   sequenceVideo
  460. end if
  461. end if
  462. end if
  463. end if
  464. end makeVideo
  465.  
  466. on askType
  467.   global cavClv
  468.  
  469.   answer "What kind of videodisc will you be using?  Will it be standard play (CAV) or extended play (CLV)?" with "CAV" or "CLV" or "Exit"
  470.   if it is "CAV"
  471.   then
  472.   put "CAV" into cavClv
  473. else
  474.   if it is "CLV"
  475.   then
  476.   put "CLV" into cavClv
  477. else
  478.   exit askType
  479. end if
  480. end if
  481.  
  482. end askType
  483.  
  484. on getFrameSeq
  485.   answer "Single frame or sequence?" with "Frame" or "Sequence"
  486.   if it is "Frame"
  487.   then
  488.   frameVideo
  489. else
  490.   sequenceVideo
  491. end if
  492. end getFrameSeq
  493.  
  494.  
  495. on frameVideo
  496.   ask "What is the framenumber?"
  497.   put it into frameNum
  498.   doMenu "New Button"
  499.   set the script of btn(number of btns) to "on mouseUp" & return & "video search," & frameNum & return & "end mouseUp"
  500.   set the icon of btn(number of btns) to 14575
  501.   set the style  of btn(number of btns) to transparent
  502.   set showname of btn(number of btns) to false
  503.   set the autoHilite of btn(number of btns)to true
  504.   set the rect of btn(number of btns) to 393, 277, 424, 301
  505. end frameVideo
  506.  
  507. on sequenceVideo
  508.   global cavClv, theResult
  509.  
  510.   ask "What is the starting number?"
  511.   put it into frameStartNum
  512.   ask "What is the ending number?"
  513.   put it into frameEndNum
  514.   lock screen
  515.   doMenu "New Button"
  516.   if cavClc contains "CLV" or theResult contains "CLV"
  517.   then
  518.   set the script of btn(number of btns) to "on mouseUp" & return & "video play," & frameStartNum  & "," & frameEndNum & ",time" && return & "end mouseUp"
  519. else
  520.   if cavClc contains "CAV" or theResult contains "CAV"
  521.   then
  522.   set the script of btn(number of btns) to "on mouseUp" & return & "video play," & frameStartNum & "," & frameEndNum && return & "end mouseUp"
  523.  
  524. end if
  525. end if
  526. set the icon of btn(number of btns) to 14575
  527. set the style  of btn(number of btns) to transparent
  528. set showname of btn(number of btns) to false
  529. set the autoHilite of btn(number of btns)to true
  530. set the rect of btn(number of btns) to 393, 277, 424, 301
  531. end sequenceVideo
  532.  
  533. on posLink   --goes with the + item on palette "Teacher"
  534.   global optionsData
  535.  
  536.   if word 4 of optionsData contains "st"
  537.   then
  538.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  539.   exit posLink
  540. end if
  541. choose browse tool
  542. lock screen
  543. answer "Your 'Positive Feedback' cards must be set up before this button will work properly." with "Cancel" or "Continue"
  544. if it is "Cancel"
  545. then
  546. exit posLink
  547. else
  548.   posLinkBtn
  549. end if
  550. click at the loc of btn (the number of buttons)
  551. unlock screen
  552. end posLink
  553.  
  554. on posLinkBtn --goes with the + item on palette "Teacher"
  555.   lock screen
  556.   set the cursor to watch
  557.   answer "Random or specific positive feedback?" with "Specific" or "Random"
  558.   put it into choice
  559.   if choice is "Random"
  560.   then
  561.   ask "Number or name (ONE word!) of the card you want to go TO, AFTER the positive feedback?"
  562. else
  563.   ask "Number or name (ONE word!) of the specific positive feedback card you want to go to?"
  564. end if
  565. put it into check
  566. put the number of words in check into num
  567. if (num > 1 or num = 0)
  568. then
  569. answer "You can enter only one number or one word, but you must have at least one. You had " && num && "items.  Click the + button on the Teacher palette and try again." with "Oops!"
  570. exit posLinkBtn
  571. else
  572.   if choice is "random"
  573.   then
  574.   doMenu "New Button"
  575.   set the script of btn (the number of buttons) to "on mouseUp" & return & "global  optionsData" & return & "put word 2 of optionsData into time" & return & "put random (the number of words in fld" && quote & "Positive Data" & quote & ")" && "into numb" & return & "put word numb of fld" && quote & "Positive Data"  & quote && "into newNumb" & return & "visual effect scroll left slow" & return & "go cd id newNumb" & return & "wait time" & return & "visual effect scroll left" & return & "go card" && check & return & "end mouseUp"
  576. else
  577.   doMenu "New Button"
  578.   set the script of btn (the number of buttons) to "on mouseUp" & return & "visual effect scroll left slow" & return & "go card" && check & return & "end mouseUp"
  579. end if
  580.  
  581. set the style of btn (the number of buttons) to checkBox
  582. set showName of btn (the number of buttons) to false
  583. show btn (the number of buttons) at 150,150
  584. set rect of btn(the number of buttons) to 100,139,118,154
  585. unlock screen
  586. end if
  587. end posLinkBtn
  588.  
  589.  
  590. on posBtn         --goes with smiley face
  591.   global optionsData, positiveCard
  592.   if word 4 of optionsData contains "st"
  593.   then
  594.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  595.   exit posBtn
  596. end if
  597. choose browse tool
  598. answer "You must be on the page that you want to make a 'Positive Feedback' page." with "I am!" or "Cancel"
  599. if it is "Cancel"
  600. then
  601. exit posBtn
  602. else
  603.   lock screen
  604.   doMenu "New Button"
  605.   set the rect of btn (the number of buttons) to 4,2,40,50
  606.   set the style of btn (the number of buttons) to transparent
  607.   set showName  of btn (the number of buttons) to false
  608.   set the icon of btn (the number of buttons) to 26465
  609.   choose the browse tool
  610. end if
  611. set the cursor to busy
  612. put the short id of this card into idNum
  613. lock screen
  614. pushIt
  615. if fld "Positive Data" is empty
  616. then
  617. put idNum into fld "Positive Data"
  618. put fld "Positive Data" into positiveCard
  619. else
  620.   put " " & idNum after fld "Positive Data"
  621.   put fld "Positive Data" into positiveCard
  622. end if
  623. pop card
  624. end  posBtn
  625.  
  626. on negLink       --goes with the - icon on the palette "Teacher"
  627.   global optionsData
  628.  
  629.   if word 4 of optionsData contains "st"
  630.   then
  631.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  632.   exit negLink
  633. end if
  634. choose browse tool
  635. lock screen
  636. answer "This prepares a button for an incorrect response. You must know the page number of the 'Try again' page you want to link to. Is that what you want to do?" with "Cancel" or "Yes"
  637. if it is "Cancel"
  638. then
  639. exit negLink
  640. else
  641.   doNegBtn
  642. end if
  643. end negLink
  644.  
  645. on doNegBtn       --goes with the - icon on the palette "Teacher"
  646.   lock screen
  647.   set the cursor to watch
  648.   ask "Number or name (ONE word!) of the INCORRECT FEEDBACK CARD?"
  649.   put it into destination
  650.   answer "Is the student to go back or continue on after the feedback?" with "Continue" or "Go back"
  651.   put it into theResponse
  652.   if theResponse is "Continue"
  653.   then
  654.   ask "Continue to what card?"
  655.   put it into setPage
  656.   push this cd
  657.   go cd destination
  658.   hide btn "Click on me to try again"
  659.   show btn "Go on"
  660.   put the script of btn "Go on" into tempScript
  661.   put setPage into word 3 of line 3 of tempScript
  662.   set the script of btn "Go on" to tempScript
  663.   choose browse tool
  664.   pop card
  665. end if
  666. domenu "New Button"
  667. if theResponse is "Go back"
  668. then
  669. set the script of btn (the number of buttons) to "on mouseUp" & return & "push this card" & return & "visual effect shrink to center" & return & "go card" && destination & return & "end mouseUp"
  670. else
  671.   set the script of btn (the number of buttons) to "on mouseUp" & return & "visual effect shrink to center" & return & "go card" && destination & return & "end mouseUp"
  672. end if
  673. set the style of btn (the number of buttons) to checkBox
  674. set showName of btn (the number of buttons) to false
  675. set rect of btn(the number of buttons) to 100,139,118,154
  676. unlock screen
  677. end doNegBtn
  678.  
  679.  
  680. on negBtn     --goes with the unhappy face on palette "Teacher
  681.   global optionsData
  682.  
  683.   if word 4 of optionsData contains "st"
  684.   then
  685.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  686.   exit negBtn
  687. end if
  688. choose browse tool
  689. lock screen
  690. answer "You must be on the page that you want to make an 'Incorrect Response' page." with "I am!" or "Cancel"
  691. if it is "Cancel"
  692. then
  693. exit negBtn
  694. else
  695.   doNegFaceBtn
  696. end if
  697. choose  browse tool
  698. unlock screen
  699. end negBtn
  700.  
  701.  
  702. on doNegFaceBtn       --goes with the unhappy face on palette "Teacher"
  703.  
  704.   doMenu "New Button"
  705.   set the rect of btn (the number of buttons) to 189,260,309,309
  706.   set the style of btn (the number of buttons) to shadow
  707.   set showName  of btn (the number of buttons) to true
  708.   set the icon of btn (the number of buttons) to 32595
  709.   set the script of btn (the number of buttons) to "on mouseUp" & return & "visual effect stretch from center" & return & "pop card" & return & "end mouseUp"
  710.   set the name of btn (the number of buttons) to "Click on me to try again"
  711.  
  712.   doMenu "New Button"
  713.   set the rect of btn (the number of buttons) to 189,260,309,309
  714.   set the style of btn (the number of buttons) to shadow
  715.   set showName  of btn (the number of buttons) to true
  716.   set the icon of btn (the number of buttons) to 32595
  717.   set the script of btn (the number of buttons) to "on mouseUp" & return & "visual effect stretch from center" & return & "go cd 4" & return & "end mouseUp"
  718.   set the name of btn (the number of buttons) to "Go on"
  719.   hide button "Go on"
  720. end doNegFaceBtn
  721.  
  722. on studentView
  723.   global optionsData
  724.   lock screen
  725.   set the cursor to busy
  726.   if word 4 of optionsData contains "te"
  727.   then
  728.   repeat with i = 1 to (the number of backgrounds)
  729.     go bg i
  730.     hide bg btn "Right"
  731.     hide bg btn "Left"
  732.   end repeat
  733.   hide tool window
  734.   hide message
  735.   put "st" & " " into word 4 of optionsData
  736.   set the userLevel to 2
  737. else
  738.   repeat with i = 1 to (the number of backgrounds)
  739.     go bg i
  740.     show bg btn "Right"
  741.     show bg btn "Left"
  742.   end repeat
  743.   show tool window
  744.   put "te" & " " into word 4 of optionsData
  745.   set the userLevel to 5
  746. end if
  747. end studentView
  748.  
  749. on cutCard   --on the X button on palette "Teacher"
  750.   global optionsData, idNum
  751.  
  752.   if word 4 of optionsData contains "st"
  753.   then
  754.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  755.   exit cutCard
  756. end if
  757. answer "Do you want to delete this card?" with "Yes" or "No"
  758. if it is "Yes"
  759. then
  760. idNumCheck
  761. go cd id idNum
  762. doMenu Cut card
  763. unlock screen
  764. else
  765.   exit cutCard
  766. end if
  767. end cutCard
  768.  
  769.  
  770. on idNumCheck    --on the X button on palette "Teacher"
  771.   global idNum, positiveCard
  772.  
  773.   put the short id of this card into idNum
  774.   set the cursor to watch
  775.   repeat with count = 1 to the number of words in positiveCard
  776.     if word count of positiveCard contains idNum
  777.     then
  778.     pushIt
  779.     put empty into word count of fld "Positive Data"
  780.     put fld "Positive Data" into positiveCard
  781.     pop card
  782.     exit repeat
  783.   end if
  784. end repeat
  785. end idNumCheck
  786.  
  787. on printMe
  788.   choose browse tool
  789.   answer "Do you want to print?" with "Yes" or "Cancel"
  790.   if it is "Cancel"
  791.   then
  792.   exit printMe
  793. else
  794.   printStuff
  795. end if
  796. end printMe
  797.  
  798. on printStuff
  799.   answer "Print what?" with "A field?" or "This card?" or "Stack?"
  800.   if it is "A field?"
  801.   then
  802.   doMenu "Print field..."
  803. else
  804.   if it is "This card?"
  805.   then
  806.   doMenu "Print card"
  807. else
  808.   if it is "Stack?"
  809.   then
  810.   doMenu "Print stack..."
  811. end if
  812. end if
  813. end if
  814. end printStuff
  815.  
  816. on showTool
  817.   global optionsData
  818.  
  819.   if word 4 of optionsData contains "st"
  820.   then
  821.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  822.   exit showTool
  823. end if
  824. answer "Do you want to use the tools menu?" with "Cancel" or "Yes"
  825. if it is "Cancel"
  826. then
  827. exit showTool
  828. else
  829.   show tool window at 443,20
  830. end if
  831. end showTool
  832.  
  833.  
  834.  
  835. on newOne
  836.   global optionsData
  837.   if word 4 of optionsData contains "st"
  838.   then
  839.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  840.   exit newOne
  841. end if
  842. --if the short name of this stack <> "HyperTEACH"
  843. --then
  844. answer "You are about to start a new stack.  When prompted, type in a name for your stack."
  845. lock screen
  846. go first
  847. ask "Name of your new stack:" with "Type file name here."
  848. put it into newName
  849. create stack newName with bg "MSTR"
  850. palette "Teacher", "30, 50"
  851. -- end if
  852. end newOne
  853.  
  854. on importPict
  855.   global optionsData
  856.  
  857.   if word 4 of optionsData contains "st"
  858.   then
  859.   Answer "You are in student preview mode.  Click on the EYE icon to change to the teacher mode and try again." with "OK"
  860.   exit importPict
  861. end if
  862. answer "Do you want to import a MacPaint-type picture?" with "OK" or "Cancel"
  863. if it is "Cancel"
  864. then
  865. choose browse tool
  866. exit importPict
  867. else
  868.   doImport
  869. end if
  870. choose browse tool
  871. end importPict
  872.  
  873.  
  874. on doImport
  875.   lock screen
  876.   choose select tool
  877.  
  878.   answer "Do you want the picture imported on this card or on a new card?" with "This card" or "New Card"
  879.   if it is "New Card"
  880.   then
  881.   doMenu "New Card"
  882. end if
  883. doMenu "Import Paint..."
  884. end doImport
  885.  
  886.  
  887.  
  888.  
  889.